Types as Spaces